---
title: Search legal cases
summary: Validate search criteria by search type and retrieve matching legal cases via the LegalApi REST integration tier.
status: draft
owner: SAIF Case Management team
last_reviewed: 2026-08-21
library: SAIF.Business.Claim.Legal
reference_type: embedded
operation_id: OP-CLL-017
trigger: User submits a case search from the presentation layer
---

# Search legal cases

Validate search criteria by search type and retrieve matching legal cases via the LegalApi REST integration tier.

| Field | Value |
|---|---|
| **Operation ID** | OP-CLL-017 |
| **Trigger** | User submits a case search from the presentation layer |
| **Inputs** | Business-object criteria properties set by the caller (see linked SQL parameter tables) |
| **Outputs** | Persisted/retrieved `clsCaseSearchCriteria` state |
| **Primary components** | `clsCaseSearchCriteria, clsCaseSearchResult, clsFindCase` |
| **Entry point** | `SAIF.Business.Claim.Legal\LegalNet\clsCaseSearchCriteria.vb, LegalNet\clsCaseSearchResult.vb, LegalNet\clsFindCase.vb` |

## Steps

1. Validate the request against applicable business rules: [BR-CLM-LGL-004](../business-rules.md#br-clm-lgl-004-case-search-input-must-match-search-type-format)
   - On failure: validation errors are collected and returned to the caller; the operation does not proceed.
2. Delegate to the LegalApi REST integration tier or an external service; no direct SQL is executed by this operation in this library.
   > **Origin**: The underlying request/response handling is implemented by the LegalApi REST client and/or the external service, not by direct SQL in this library.
3. Return the resulting object graph (or success/failure status) to the caller.

## Process flow

```mermaid
flowchart TD
	Start([User submits a case search from the presentation layer]) --> Validate[Validate business rules]
	Validate --> Decision{Valid?}
	Decision -->|No| EndErr([Return validation errors])
	Decision -->|Yes| Exec[Execute data access for clsCaseSearchCriteria]
	Exec --> EndOk([Return result])
```

## Failure and edge-case behavior

- Validation failure: the operation returns collected errors without persisting any change.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

## Sources
- `SAIF.Business.Claim.Legal\` (clsCaseSearchCriteria, clsCaseSearchResult, clsFindCase)